class tpshop_login_api:
    # 获取验证码
    @classmethod
    def get_code(cls, session):
        session.get("http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=verify&r=0.06189666874072741")

    @classmethod
    def tpshop_login(cls, session, json_data):
        url = 'http://hmshop-test.itheima.net/index.php?m=Home&c=User&a=do_login&t=0.36692329491312203'
        header = {"Content-Type": "application/x-www-form-urlencoded"}
        resp = session.post(url=url, headers=header, data=json_data)
        return resp
